bit_bang_uart.h File Reference

public methods for bit_bang_uart.c More...

Defines

#define NO_CHARACTER_RECEIVED   0xFF

Functions

char getReceivedCharacter ()
void bitBangOutput (unsigned char byte)
char bitBangInput ()

Detailed Description

public methods for bit_bang_uart.c

Rev
546
Author
dsmith
Date
2010-05-27 17:11:05 -0700 (Thu, 27 May 2010)

Function Documentation

char bitBangInput (  ) 

Blocking UART receiver. Called by BIT_BANG_RX_PORT Interrupt Service Routine upon detection of start bit (high to low transition). BIT_BANG_RX_BIT should be configured as high-low edge triggered interrupt. Receives a byte and then processes it.

Note:
BIT_BANG_RX_PORT, BIT_BANG_RX_BIT, DISABLE_BIT_BANG_RX_INTERRUPT(), and ENABLE_BIT_BANG_RX_INTERRUPT() must be defined. Modify accordingly for other hardware.
Precondition:
Oscillator configured for 8MHz
A high-to-low transition has occurred on BIT_BANG_RX_BIT
Returns:
the byte received
void bitBangOutput ( unsigned char  outputByte  ) 

Transmits one byte out the specified pin

To Send a Byte

  • Line is nominally at '1' (high)
  • 1 Start bit = '0'
  • Data, MSB first, LSB last. '1' = line high, '0' = line low
  • 1 Stop bit = '1' (idle, or high)
    Note:
    BIT_BANG_RX_PORT, BIT_BANG_RX_BIT, DISABLE_BIT_BANG_RX_INTERRUPT(), and ENABLE_BIT_BANG_RX_INTERRUPT() must be defined. Modify accordingly for other hardware.
    Precondition:
    Oscillator configured for 8MHz
    port/bit configured for logic output.
    bit is high (logic '1')
    Parameters:
    byte the byte to output
 All Files Functions Defines
Generated on Wed Jun 16 11:10:23 2010 for Common by  doxygen 1.6.3